#ifndef _LCD_H_
#define _LCD_H_

#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
#include <sys/mman.h>
#include <string.h>
#include <math.h>
#include <linux/input.h>
#include <stdlib.h>
 #include <unistd.h>
 
#define RED		(0X00FF0000)
#define ORANGE	(0X00FF8000)
#define YEA		(0X00FFFF00)
#define GREEN	(0X0000FF00)
#define BLUE	(0X000000FF)
#define DIAN	(0X0000FFFF)
#define PERPO	(0X00FF00FF)
#define WHITE	(0XFFFFFFFF)
#define BLACK	(0X00000000)

#define WIDTH	(800)
#define HIGHT	(480)


union color_picture
{
    int color;
    char color_buf[4];
};

extern int color_array[7];

void set_piex_color(int *addr,int x,int y,int color);
void draw_rectangle(int *addr, int s_x, int s_y, int w, int h,int color);
void draw_line(int *addr, int s_x, int s_y, int w, int l,int color,int mod);
void draw_rectangle_box(int *addr, int s_x, int s_y, int w, int h,int wl ,int color);
void draw_circle(int *addr, int c_x, int c_y, float r,int color,int mod);
void lcd_clear(int *addr,int color);
int show_bmp( int *addr,const char *bmp_file,int x,int y,int w, int h);
int lcd_open(int **lcd_p);






#endif /*_LCD_H_*/